﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using MINERP.GroupMember.IView;
using MINERP.GroupMember.Presenter;

namespace MINERP.GroupMember
{
    public partial class FrmHistory_BK : Form, ILookHistory_BK
    {

        private LookHistory_BKPresenter _presenter;

        public FrmHistory_BK()
        {
            InitializeComponent();
            DeStart.DateTime = DateTime.Now;
            DeEnd.DateTime = DateTime.Now;
            _presenter = new LookHistory_BKPresenter(this);
            
        }

        #region ILookHistory_BK 成员

        public DateTime StartDate
        {
            get { return DeStart.DateTime.Date; }
        }

        public DateTime EndDate
        {
            get { return DeEnd.DateTime.Date; }
        }

        public void ShowResult(List<MINERP.BLL.Statistics.PerformanceView> listResult)
        {
            gridControl1.DataSource = listResult;
        }

        public void ShowCount(double totalAreaCount)
        {
            label1.Text = "面积合计：" + totalAreaCount.ToString("0.0000") + "㎡";
        }

        #endregion

        private void simpleButton1_Click(object sender, EventArgs e)
        {
            this.Cursor = Cursors.WaitCursor;
            _presenter.GetResult();
            this.Cursor = Cursors.Default;
        }
    }
}
